package entities;

import java.util.Comparator;

public class LinkAssociationComparator implements Comparator<LinkAssociation> {

	@Override
	public int compare(LinkAssociation o1, LinkAssociation o2) {
		int c = o1.getFromCode().compareTo(o2.getFromCode());
		if(c == 0) {
			return o1.getToCode().compareTo(o2.getToCode());
		} else {
			return c;
		}
	}

}
